<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%><%@ page import="hyl.core.db.MyDB"%><%@ page 
	import="hyl.My,hyl.core.MyFun,java.io.IOException"%><%@ page 
	import="java.util.List,java.util.Map,java.sql.Connection,java.math.BigDecimal"%><% 
response.setCharacterEncoding("UTF-8");  
response.setContentType("text/plain");  
MyDB db = My.getDb1();
	String sql1 = "select * from member where userid=? ";
	String[] param1 = new String[1];
	param1[0] =request.getParameter("userid"); 	
	List<Map<String, Object>> list = db.queryList(sql1, param1); 
	String s="";
	if (list.size()==0){ 
		String sql = "insert into member(userid,password)values(?,?)";
		String[] param = new String[2];
		param[0] = request.getParameter("userid");
		param[1] = request.getParameter("password");
		db = My.getDb1();
		int rtn = db.executeUpdate(sql, param);
		if (rtn > 0) {
			  s="ok"; 
		} else if (rtn == 0) {
			s="no";
		}
	} else{ 
		 s="fail";
	} 
	response.getWriter().print(s);	
%>